home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / fontreqc.lha / FontReqClass10 / FontReqClassTest.c < prev    next >
C/C++ Source or Header  |  1995-09-17  |  868b  |  46 lines

  1. #include <proto/asl.h>
  2. #include <proto/intuition.h>
  3. #include <clib/alib_protos.h>
  4. #include <Boopsi/FontReqClass.h>
  5.  
  6. #include <stdio.h>
  7.  
  8. #ifdef _DCC
  9. #include <lib/Misc.h>
  10. #endif
  11.  
  12. main( int argc, char **argv )
  13. {
  14. Class   *FontReqClass=NULL;
  15. Object  *ReqObj=NULL;
  16. ULONG   t;
  17.  
  18.     FontReqClass=InitFontReqClass();
  19.  
  20.  
  21.     if( FontReqClass )
  22.     {
  23.         ReqObj = NewObject( FontReqClass, NULL, ASLFO_FixedWidthOnly, TRUE, TAG_END );
  24.  
  25.         if( FontRequester( ReqObj ) )
  26.         {
  27.             GetAttr( FC_TTextAttr, ReqObj, &t );
  28.             printf("FontName: %s\n", ((struct TTextAttr *)t)->tta_Name );
  29.         }
  30.  
  31.         DisposeObject( ReqObj );
  32.  
  33.         FreeFontReqClass( FontReqClass );
  34.     }
  35.  
  36.     return(0);
  37. }
  38.  
  39. #ifdef _DCC
  40. int wbmain( struct WBStartup *w )
  41. {
  42.     OpenConsole( "CON:0/150//100/FontReqClassTest output/WAIT/CLOSE" );
  43.     return( main( 0, 0 ) );
  44. }
  45. #endif
  46.